<template>
  <div>
    <!-- <h3>首页</h3> -->
        <!-- 轮播图 -->
    <div class="block">
      <el-carousel height="400px">
        <el-carousel-item v-for="item in list" :key="item.id">
          <img style="height: 400px" :src="item.image" :alt="item.desc" />
        </el-carousel-item>
      </el-carousel>
    </div>
  </div>
</template>

<script>
import Axios from 'axios'
export default {
  name: "",
  data() {
    return {
        list:[],
    };
  },
  props: {},

  components: {},

  created() {},

  mounted() {
    // 获取轮播图
    Axios.get("http://127.0.0.1:8000/api/menu/slideshows/").then((res) => {
      console.log("获取轮播图：", res);
      this.list = res.data;
    });
  },

  methods: {},

  computed: {},

  watch: {},

  directives: {},

  filters: {},
};
</script>

<style>

</style>
